﻿// <copyright file="RuleModule.cs" company="Beuth Hochschule für Technik">
// Breakdown - Configure your Windows 7 Firewall
// Copyright (C) 2009 Stefan "dersteps@gmail.com" Matyba
// This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; 
// either version 3 of the License, or (at your option) any later version.
// 
// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along with this program; if not, see http://www.gnu.org/licenses/.
// </copyright>
// <author>Stefan Matyba</author>
// <email>dersteps@gmail.com</email>
// <date>2009-10-18</date>
// <summary>Manages the DI bindings for Ninject</summary>

namespace Breakdown.Logic
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Breakdown.Logic;
    using Breakdown.Aspects;
    using Ninject.Core;
    
    /// <summary>
    /// Defines a module to load into the Ninject DI kernel which binds the composition elements of a firewall rule to specific implementations
    /// </summary>
    public class RuleModule : StandardModule
    {
        /// <summary>
        /// Called when the kernel loads, binding the implementations
        /// </summary>
        [Logged]
        public override void Load()
        {
            Bind<IInterfaceAffector>().To<InterfaceAffector>();
            Bind<IScoped>().To<Scope>();
            Bind<IServiceAffector>().To<ServiceAffector>();
            Bind<IProgramAffector>().To<ProgramAffector>();
        }
    }
}
